
component  output="false" extends="ModelGlue.Util.ValidationErrorCollection"
{

	public it.millemultimedia.easyBlog.validator.UserValidator function init(){
		
		super.init();
		
		return this;
	}
	
	public void function validate( required Any bean ){
		
		if( not len( arguments.bean.getUsername() ) ){

			addError( 'Username', 'Username is required' );
		
		}
		
		if( not len( arguments.bean.getPassword() ) ){

			addError( 'Password', 'Password is required' );
		
		}
		
		if( not len( arguments.bean.getEmail() ) ){

			addError( 'Email', 'Email is required' );
		
		}
		
		if( not len( arguments.bean.getName() ) ){

			addError( 'Name', 'Name is required' );
		
		}

	}

}
